/**
 * @Project : algorithm-learning
 * @Author : Ruoyu Wang
 * @User : Momenta
 * @DateTime : 2024/4/16 14:21
 */

#include <iostream>
#include <vector>

using namespace std;

class Solution {
public:
    vector<bool> kidsWithCandies(vector<int> &candies, int extraCandies) {
        int maxnum = -1;
        for (int i = 0; i < candies.size(); ++i) {
            maxnum = max(maxnum, candies[i]);
        }
        vector<bool> res;
        for (int i = 0; i < candies.size(); ++i) {
            res.push_back(extraCandies + candies[i] >= maxnum);
        }
        return res;
    }
};